Skip to content

Conversation

@georgeliao
Copy link
Contributor

@georgeliao georgeliao commented Apr 3, 2025

MULTI-1887
MULTI-1892

First, about the warning message, I reused the message from hyperkit. It alludes the migration we want to provide. Are we certain that we will offer a migration plan? Otherwise we need to tune warning message a bit.

For functional testing, only the following operations should trigger the warning message
multipass set local.driver=lxd/libvirt
multipass list, multipass launch, multipass info when the current driver is lxd or libvirt

@georgeliao georgeliao marked this pull request as draft April 3, 2025 13:06
@georgeliao georgeliao changed the title [daemon] added the lxd deprecation warning for multipass list command. add deprecation warnings for lxd and libvirt related commands Apr 3, 2025
@codecov
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

❌ Patch coverage is 38.88889% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.44%. Comparing base (b086fb7) to head (9c57114).
⚠️ Report is 405 commits behind head on main.

Files with missing lines Patch % Lines
src/utils/utils.cpp 0.00% 7 Missing ⚠️
src/daemon/daemon.cpp 66.66% 3 Missing ⚠️
src/client/cli/cmd/set.cpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4024      +/-   ##
==========================================
- Coverage   89.50%   89.44%   -0.07%     
==========================================
  Files         259      259              
  Lines       14740    14758      +18     
==========================================
+ Hits        13193    13200       +7     
- Misses       1547     1558      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@georgeliao georgeliao force-pushed the lxd_libvirt_deprecation_warning branch 2 times, most recently from 8022cdc to 4208184 Compare April 4, 2025 20:47
@georgeliao georgeliao marked this pull request as ready for review April 7, 2025 08:13
@georgeliao georgeliao requested review from ricab and sharder996 April 7, 2025 08:15
@georgeliao georgeliao force-pushed the lxd_libvirt_deprecation_warning branch 2 times, most recently from 47088e4 to c01203b Compare April 7, 2025 08:41
@georgeliao georgeliao changed the title add deprecation warnings for lxd and libvirt related commands add deprecation warnings for lxd and libvirt related commands and documents Apr 7, 2025
@sharder996
Copy link
Collaborator

As far as I know, we will not be providing a programmatic way of migrating VMs through Multipass. It is possible that we a provide a guide for the user to still be able to access their VMs, but that still needs to be researched.

Copy link
Collaborator

@sharder996 sharder996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things that still need to be tweaked, mostly docs stuff.

A few other thoughts, though:

I would like to see the changes in the docs put into a separate PR. Several reasons for this:

  • One, doc changes are instantaneous as in the user will see them right away, whereas code changes will only be visible in the next release (except for users on the edge channel).
  • Two, I think it would be good to have some input from a technical author on how to format a consistent deprecation warning. I'm not sure a find and replace is the best approach.
  • Three, there are still some code changes that need to happen and be reflected in the docs (i.e. CPU architecture support).

@georgeliao
Copy link
Contributor Author

I would like to see the changes in the docs put into a separate PR. Several reasons for this:

Moving the docs commits into another PR is good idea, will do.

Two, I think it would be good to have some input from a technical author on how to format a consistent deprecation warning. I'm not sure a find and replace is the best approach.

Not sure about how feasible it is to actually get a technical author review, but we can definitely refine on the current approach.

@georgeliao georgeliao force-pushed the lxd_libvirt_deprecation_warning branch from 8d5f9c1 to c01203b Compare April 8, 2025 10:23
@georgeliao georgeliao changed the title add deprecation warnings for lxd and libvirt related commands and documents add deprecation warnings for lxd and libvirt related commands Apr 8, 2025
@ricab
Copy link
Collaborator

ricab commented Apr 9, 2025

We'll need to offer an alternative in ARM architectures and replace LXD as default. Until then, we'd be issuing deprecation warnings to people who have no other option (fine in edge).

This means bringing QEMU in the snap for them too (hopefully only the right one for each architecture). Maybe better move it to vcpkg first?

All that can go in separate PRs, but I think it's necessary to complete the deprecation.

@georgeliao georgeliao force-pushed the lxd_libvirt_deprecation_warning branch 3 times, most recently from 5d7809f to d8eebff Compare April 9, 2025 15:06
@georgeliao
Copy link
Contributor Author

@sharder996 @ricab docs related comments are addressed in the docs PR. The comments of this PR are also addressed, feel free to have a final scan and we can start merging soon.

sharder996
sharder996 previously approved these changes Apr 11, 2025
Copy link
Collaborator

@sharder996 sharder996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Will be removed in a future PR so not too concerned about having it perfect.

Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jia, this is what we need. I have some minor suggestions inline.

Comment on lines 77 to 78
"After the removal, you will find the guide on how to access the {0} instances on \n"
"https://documentation.ubuntu.com/multipass/en/latest/\n\n"; // TODO lxd and libvirt migration, remove
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that we point to (future) documentation. However, maybe we could tune this to the driver and say:

  • for libvirt: "Your instances will remain available with the QEMU driver"
  • for LXD: "Your instances will no longer be available in Multipass then, but they will remain in LXD.

Then, when we actually remove the backend, we can say "... driver has been removed. Multipass is now using QEMU. ":

  • for libvirt: "Your instances remain available."
  • for LXD: "Your instances are still available in LXD. To access them, use lxc --project=multipass .... lxc --help for more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that is better if we intend to let the user to access the lxd vm via lxd instead of offering a migration plan or guide.

Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @georgeliao, sorry I wasn't very clear. My idea was to actually come up with the appropriate message depending on which driver was selected, not print messages for both. Feel free to add different constants or derive the messages in some central part of the code if that is appropriate.

@georgeliao
Copy link
Contributor Author

@ricab @sharder996 Maybe we can do another round of scan and finalize this?

constexpr auto driver_deprecation_warning_template_common_part =
"**Warning! The {0} driver is deprecated and will be removed in an future "
"release.**\n\n";
"***Warning! The {0} driver is deprecated and will be removed in an future "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing a space before/after the stars 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@georgeliao how about this one?

Copy link
Contributor Author

@georgeliao georgeliao Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not notice that until you pointed out. Yes, the blueprint warning does have the space.

Copy link
Contributor Author

@georgeliao georgeliao May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricab If there is no more comments. I think we can start to merge.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would still like to take this for a spin Jia, and I am afraid I have no time today. I'll try to do that on Monday.

}

std::string deprecation_warning_message_driver_concatenated(
const QString driver_name); // TODO lxd and libvirt migration, remove
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no "migration" in this case, but we get the idea...

Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Jia, almost there. I'd request only minor tweaks to messages.

@georgeliao
Copy link
Contributor Author

@ricab about the build, the Linux/Dispatch step is supposed to fail, right?

@georgeliao georgeliao enabled auto-merge May 8, 2025 12:49
georgeliao and others added 22 commits May 9, 2025 17:34
Co-authored-by: ScottH <59572507+sharder996@users.noreply.github.com>
Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: Ricardo Abreu <ricardo.abreu@canonical.com>
Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: Ricardo Abreu <ricardo.abreu@canonical.com>
Signed-off-by: George Liao <georgeliaojia@gmail.com>
Co-authored-by: Ricardo Abreu <ricardo.abreu@canonical.com>
Signed-off-by: George Liao <georgeliaojia@gmail.com>
@georgeliao georgeliao force-pushed the lxd_libvirt_deprecation_warning branch from 2093e0d to 9c57114 Compare May 9, 2025 15:35
@georgeliao georgeliao added this pull request to the merge queue May 9, 2025
Merged via the queue into main with commit d96227a May 9, 2025
17 of 19 checks passed
@georgeliao georgeliao deleted the lxd_libvirt_deprecation_warning branch May 9, 2025 22:25
@ricab ricab added this to the 1.16.0 milestone Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants